Bentley Map V8i (SELECTseries 10) Help

Writing Reports with Scripts

The script language allows writing reports to ASCII files. The PRINT and DPRINT commands described in Error! Unknown switch argument are used to write lines to the report file. The OUTPUT command handles the report files.

Syntax: OUTPUT "filename" [/OVERWRITE | /APPEND|

or

OUTPUT CLOSE

or

OUTPUT EDIT

The OUTPUT "filename" command is used to open a report file with the specified name. The filename can be specified by the full path to the file. If only the filename is given, the file will be placed in the same directory (folder) as the script file. If the specified file already exists and the qualifier /OVERWRITE is not given, the user is asked if it is OK to overwrite the old file. If the /APPEND qualifier is used and the specified file already exist, any PRINT command appends the new file to the existing file. If /APPEND is used and the file does not exist, a new file will be created.

If a report file is open, any use of the PRINT and DPRINT commands write the output to this file.

The OUTPUT CLOSE and OUTPUT EDIT commands both close an open report file. The only difference is that OUTPUT EDIT sends the newly written report file to the selected editor.

Opening and closing a report file normally is done just before and after one or more scripts are executed.

Example: